<template>
	<view class="container">
		<!-- 图片展示 -->
		<image class="station-image" src="/static/station.jpg" mode="widthFix"></image>

		<!-- 加油站信息 -->
		<view class="station-info">
			<text class="station-name">{{ stationName }}</text>

		</view>
		<view class="station-time">{{ operatingHours }}</view>
		<view class="station-address">{{ address }}</view>
		<!-- 油价列表 -->
		<view class="price-list">
			<text class="price-title">油价详情</text>
			<view v-for="(price, index) in fuelPrices" :key="index" class="price-item">
				<text class="fuel-type">{{ price.type }}</text>
				<text class="fuel-price">{{ price.price }}元/L</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';

	// 加油站信息
	const stationName = ref('中途石油加油站');
	const operatingHours = ref('营业时间：周一至周五 09:00-22:00');
	const address = ref('山阳区人民中路32号');

	// 油价列表
	const fuelPrices = ref([{
			type: '92#',
			price: '5.85'
		},
		{
			type: '95#',
			price: '5.85'
		},
		{
			type: '98#',
			price: '5.85'
		},
		{
			type: '0#',
			price: '5.85'
		}
	]);
</script>

<style>
	.container {
		padding: 20rpx;
	}

	.station-image {
		width: 100%;
		height: 400rpx;
		margin-bottom: 20rpx;
	}

	.station-info {
		margin-bottom: 20rpx;
	}

	.station-name {
		font-size: 32rpx;
		font-weight: bold;
		margin-bottom: 10rpx;
	}

	.station-time {
		font-size: 28rpx;
		color: #666;
		margin-bottom: 10rpx;
	}

	.station-address {
		font-size: 28rpx;
		color: #666;
	}

	.price-list {
		margin-top: 20rpx;
	}

	.price-title {
		font-size: 30rpx;
		font-weight: bold;
		margin-bottom: 10rpx;
	}

	.price-item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx;
		border-bottom: 1rpx solid #eee;
	}

	.fuel-type {
		font-size: 28rpx;
		color: #333;
	}

	.fuel-price {
		font-size: 28rpx;
		color: #ff5722;
	}
</style>